package com.company.装饰模式2;

import com.company.装饰模式2.impl.ReadDecorator;
import com.company.装饰模式2.impl.SingDecorator;
import com.company.装饰模式2.impl.Worker;

public class Test {
    static void test(Person person){
        person.work();
    }

    public static void main(String[] args) {
        Person p = new ReadDecorator(new SingDecorator(new Worker()));
        test(p);
    }
}
